package com.nwpu.am.service;

import com.nwpu.am.pojo.dto.RuleDTO;
import com.nwpu.am.pojo.entity.Rule;

import java.util.ArrayList;

/**
 * UserService
 *
 * @author Fbf
 * @version 1.0
 * {@code @date} 2024/6/6
 */


public interface RuleService {
    /**
     * 展示知识库
     *
     * @retrun ArrayList<Knowledge>
     */
    ArrayList<Rule> getAllRule();

    /**
     * 添加知识
     *
     * @param ruleDTO
     * @return boolean
     */
    int addRule(RuleDTO ruleDTO);

    /**
     * 删除推理规则
     * @param ruleId
     * @return int: 0-删除失败 1-删除成功
     */
    int deleteRule(long ruleId);

    /**
     * 根据id查找推理规则
     * @param ruleId
     * @return Rule
     */
    Rule selectById(long ruleId);
}
